package com.shanzmoo.admin.domain.dto;

import cn.hutool.core.bean.BeanUtil;
import ${package.Entity}.${entity};

import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * ${table.comment!} 保存对象
 *
 * @author ${author} ${date}
 */
@Data
@ApiModel("${table.comment!}-保存对象")
public class ${entity? replace('Entity','SaveDTO')} implements Serializable {

    private static final long serialVersionUID = 1L;

<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list table.fields as field>
    <#if field.keyFlag>
    <#else>
    @ApiModelProperty(value = "${field.comment}")
    private ${field.propertyType} ${field.propertyName};
    </#if>

</#list>
<#------------  END 字段循环遍历  ---------->
    public ${entity!} convertEntity() {
        ${entity!} target = new ${entity!}();
        BeanUtil.copyProperties(this, target, true);
        return target;
    }
}
